package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
public class CategoryAddNewParam implements Serializable {
    @NotNull(message = "必须提交分类的名字")
    @ApiModelProperty(value = "分类名称",required = true,example = "dada的分类")
    private String name;
    @Range(message = "父类为正数")
    @ApiModelProperty(value = "分类父id",required = true,example = "0")
    private Long parentId ;
    @Range(message = "层级为正数")
    @ApiModelProperty(value = "层级",required = true,example = "0")
    private Integer depth ;
    @ApiModelProperty(value = "分类关键字",required = true,example = "关键字")
    private String keywords;
    @Range(max = 99,message = "序号必须是0-99")
    @NotNull(message = "必须提交品牌的排序号")
    @ApiModelProperty(value = "品牌序号",required = true,example = "45")
    private Integer sort;
    @ApiModelProperty(value = "分类网址",required = true,example = "http://...")
    private String icon;
    @Range(max = 1,message = "使能号必须是0-1")
    @ApiModelProperty(value = "品牌使能号",required = true,example = "0")
    private Integer enable;
    @Range(max = 1,message = "是否为父类必须是0-1")
    @ApiModelProperty(value = "是否为父类",required = true,example = "0")
    private Integer isParent;
    @Range(max = 1,message = "是否显示必须是0-1")
    @ApiModelProperty(value = "分类是否显示",required = true,example = "0")
    private Integer isDisplay;

}

